<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css">
    <script type="text/javascript" src="/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script>
    <script>
        $(function () {
            $("#dg").dialog({
                title:"弹出框",
                width:700,
                height:500,
                cache:true,
                closed:true,
                iconCls:"icon-save",
                buttons:[
                    {
                        text:"提交",
                        iconCls:"icon-add",
                        handler:function () {
                            let v = $("#cbx").combobox("getValue");
                            alert(v);
                        }
                    },
                    {
                        text:"关闭",
                        iconCls:"icon-remove",
                        handler:function () {
                            $("#dg").dialog("close");
                        }
                    }
                ]
            });

            $("#cbx").combobox({
                width:200,
                value:"全部",
                url:"/user/findUser",
                valueField:"id",
                textField:"username"
            });
        });

        function opendg() {
            $("#dg").dialog("open");
        }
    </script>
</head>
<body>
    <button type="button" onclick="opendg()">打开</button>
    <div id="dg">
        <form>
            <select id="cbx"></select>
        </form>
    </div>
</body>
</html>